<?php
session_start();
if(!$_SESSION["trv3_07"]){
	header("location:../login.php");
	exit;
}
require "../resources/v1.php";
if( !get_magic_quotes_gpc()){
	$XCB01 = addslashes( trim( $_GET['val']));
}else{
    $XCB01 = trim( $_GET['val']);
}
if( $XCB01){
	$conexion = server_reconnect();
	$query = "select s.`nom`, s.`id` from `ins` s where s.`cr`=".$XCB01;
	$result = mysql_query( $query, $conexion);
	if( $mxcel = @mysql_fetch_array($result)){
		echo '<?xml version="1.0" encoding="UTF-8"?><input><CB02>'.$mxcel['nom'].'</CB02><HD13>'.$mxcel['id'].'</HD13></input>';
	}else{
		echo '<?xml version="1.0" encoding="UTF-8"?><input><CB02> </CB02><HD13>0</HD13></input>';
	}
	server_disconnect( $conexion);
}
?>